package com.jack.cms.modular.system.api;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jack.cms.common.annotion.Permission;
import com.jack.cms.common.constant.Const;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(value = "/mgr", description = "代码生成")
@RequestMapping("/code")
public interface CodeApi {

	@RequestMapping("")
	String index();

	@ApiOperation(value = "生成代码")
	@ApiImplicitParams({ @ApiImplicitParam(name = "moduleName", value = "模块名称", required = true, dataType = "String"),
			@ApiImplicitParam(name = "bizChName", value = "业务名称", required = true, dataType = "String"),
			@ApiImplicitParam(name = "bizEnName", value = "业务英文名称", required = true, dataType = "String"),
			@ApiImplicitParam(name = "path", value = "项目生成类路径", required = true, dataType = "String") })
	@RequestMapping(value = "/generate", method = RequestMethod.POST)
	@ResponseBody
	@Permission(Const.ADMIN_NAME)
	Object add(String moduleName, String bizChName, String bizEnName, String path);
}
